import Vue from 'vue'
import Router from 'vue-router'
import EasySlider from 'vue-easy-slider'
import Hello from '@/components/Hello'
import Home from '@/components/Home'
import Class from '@/components/Class'
import Artist from '@/components/Artist'
import ShoppingCar from '@/components/ShoppingCar'
import Mine from '@/components/Mine'
import Home_rec from '@/components/home/Home_rec'
import Home_rm from '@/components/home/Home_rm'
import Home_ql from '@/components/home/Home_ql'
import Home_mz from '@/components/home/Home_mz'
import Home_jj from '@/components/home/Home_jj'
import AiteOnline_home from '@/components/home/home2/AiteOnline_home'
import Enter_ywart from '@/components/home/Enter_ywart'
import Login from '@/components/mine/Login'
import Zhanghao_login from '@/components/mine/Zhanghao_login'
import Phone_login from '@/components/mine/Phone_login'
import Login_car from '@/components/shoppingCar/Login_car'
import Zhanghao_car_login from '@/components/shoppingCar/Zhanghao_car_login'
import Phone_car_login from '@/components/shoppingCar/Phone_car_login'
// import Sort from '@/components/class/Sort'
import Sort_1 from '@/components/class/sort_1'
import Sort_2 from '@/components/class/sort_2'
import Sort_3 from '@/components/class/sort_3'
import Sort_4 from '@/components/class/sort_4'
import Forget from '@/components/mine/Forget'
import Register from '@/components/mine/Register'
import Art_collect from '@/components/artist/art_collect'
// import Home_footer from '@/components/home/Home_footer'

Vue.use(Router)
Vue.use(EasySlider)

export default new Router({
  routes: [
    {
      path: '/',
      name: 'Hello',
      component: Hello,
      children: [
        {
          path: '/home',
          name: 'Home',
          component: Home,
          children: [
            {
              path: '/home/home_rec',
              name: 'Home_rec',
              component: resolve => require(['@/components/home/Home_rec'],resolve)
            },
            {
              path: '/home/home_rm',
              name: 'Home_rm',
              component: resolve => require(['@/components/home/Home_rm'],resolve)
            },
            {
              path: '/home/home_ql',
              name: 'Home_ql',
              component: resolve => require(['@/components/home/Home_ql'],resolve)
            },
            {
              path: '/home/home_mz',
              name: 'Home_mz',
              component: resolve => require(['@/components/home/Home_mz'],resolve)
            },
            {
              path: '/home/home_jj',
              name: 'Home_jj',
              component: resolve => require(['@/components/home/Home_jj'],resolve)
            }
          ],
          redirect:"/home/home_rec"
        },
        {
          path: '/class',
          name: 'Class',
          component: resolve => require(['@/components/Class'],resolve),
          children: [
            {
              path: '/class/sort_1',
              name: 'Sort_1',
              component: Sort_1
            },
            {
              path: '/class/sort_2',
              name: 'Sort_2',
              component: Sort_2
            },
            {
              path: '/class/sort_3',
              name: 'Sort_3',
              component: Sort_3
            },
            {
              path: '/class/sort_4',
              name: 'Sort_4',
              component: Sort_4
            }
          ],
          redirect:"/class/sort_1"
        },
        {
          path: '/artist',
          name: 'Artist',
          component: resolve => require(['@/components/Artist'],resolve)
        },
        {
          path: '/shoppingCar',
          name: 'ShoppingCar',
          component: resolve => require(['@/components/ShoppingCar'],resolve)
        },
        {
          path: '/mine',
          name: 'Mine',
          component: resolve => require(['@/components/Mine'],resolve)
        }
      ],
      redirect: '/home'
    },
    {
      path: '/login',
      name: 'Login',
      component: Login,
      children: [
        {
          path: '/login/zhanghao_login',
          name: 'Zhanghao_login',
          component: resolve => require(['@/components/mine/Zhanghao_login'],resolve)
        },
        {
          path: '/login/phone_login',
          name: 'Phone_login',
          component: resolve => require(['@/components/mine/Phone_login'],resolve)
        }
      ],
      redirect: '/login/zhanghao_login'
    },
    {
      path: '/login_car',
      name: 'Login_car',
      component: Login_car,
      children: [
        {
          path: '/login_car/zhanghao_car_login',
          name: 'Zhanghao_car_login',
          component: resolve => require(['@/components/shoppingCar/Zhanghao_car_login'],resolve)
        },
        {
          path: '/login_car/phone_car_login',
          name: 'Phone_car_login',
          component: resolve => require(['@/components/shoppingCar/Phone_car_login'],resolve)
        }
      ],
      redirect: '/login_car/zhanghao_car_login'
    },
    {
      path: '/art_collect',
      name: 'Art_collect',
      component: Art_collect
    },
    {
      path: '/forget',
      name: 'Forget',
      component: Forget
    },
    {
      path: '/register',
      name: 'Register',
      component: Register
    },
    {
      path: '/AiteOnline/aiteOnline_home',
      name: 'AiteOnline_home',
      component: AiteOnline_home
    },
    {
      path: '/enter_ywart',
      name: 'Enter_ywart',
      component: Enter_ywart
    }
  ]
})
